The invention relates to a method and system for database query by using a querying device, and particularly to a user-oriented method and system for database query.
Conventional database query systems employ a client/server architecture. In the process of submitting a query request and obtaining the query results, there is kept a continuous connection between the client computers and servers. For the mobile users, as the battery capacities are limited and the users are moving around all the time, it is not feasible to keep a continuous connection between the querying devices and servers during the query.
In order to employ the querying devices for database query, a client/agent/server architecture has been developed for implementing a system for database query by using a querying device. In such an architecture, an agent is added in between the mobile client and the server. The agent converts a query request submitted by a client into a corresponding database query command; hands it over to the server; converts it into a format acceptable by the client after the query results returned by the server are received; and, finally sends the results back to the client.
Although the database query system of the existing client/agent/server architecture does not require keeping a continuous connection between the querying devices and the agent computers, it requires that the query result receiving device and the querying device submitting the request are one device. Obviously this requirement restricts the types of devices which may be used as querying devices of the client computers, because it requires that the querying devices should have certain data input and data output capabilities at the same time. However, the devices which have certain data input and data output capabilities at the same time are usually rather expensive and not so popular among most users, so they are not suitable for being used as querying devices. This situation restricts, to a certain extent, the applications of existing client/agent/server architecture database query system for most of the users.
Up to now, various kinds of computing devices have been developed. Moreover, with the rapid development of science and technology, there will appear more sophisticated computing devices. Those computing devices will have various computing capabilities and communication capabilities. For example, CrossPad has only data input capability but no data display capability. One-way pagers can only receive data but cannot transmit data. Many PDAs (Personal Digital Assistants) have Infra-Red interfaces, which are only suitable for short distance communications. The above computing devices cannot be used as querying devices in the database query systems of the existing client/agent/server architecture. So it is a big problem in the prior technology to provide various kinds of the existing computing devices which can be used for database query.
The other problem in the prior technology is that the users cannot obtain any query results due to querying device faults, device loss or other reasons, after the querying devices have submitted query requests. In some special cases, when the information about natural disasters such as flood, earthquake, typhoon etc. is urgently needed, the loss of query results may mean great loss of lives and property. That is, in some cases the database query systems of the existing client/agent/server architecture are not reliable.
It is therefore an object of the invention to solve the above problems in the prior technology and to provide a user-oriented database query method and system so that the users can employ various kinds of the existing computing devices as querying devices for database query and can obtain the query results.
The foregoing and other objects are realized by the present invention which provides a user-oriented database query method and system for performing the method comprising the following steps, which are executed by the agent computer, of:
(1) establishing a connection with a querying device, identifying a user and a querying device;
(2) receiving a query request and appended parameters from the identified querying device;
(3) converting the query request into a database query command based on the querying device type and the queried database type;
(4) determining a query time based on the appended parameters, the network status and the predetermined information;
(5) submitting the database query command after the expiration of the query time and then receiving query results;
(6) determining a receiving device based on the appended parameters, the predetermined information and the query results;
(7) converting the query results into a form acceptable by said receiving device; and
(8) sending query results to said receiving device and terminating the query after the acknowledgment of success of sending.
The invention further provides a user-oriented database query system comprising user management means for managing a plurality of users registered in said database query system and the predetermined information of individual users; device management means for managing a plurality of querying devices and a plurality of receiving devices supported by said database query system; control means for identifying a user by using said user management means, for receiving a database query request and the appended parameters, sent by the user using a querying device converting said database query request into a database query command based on the querying device type and the queried database type, and for determining a query time based on the appended parameters, the network status and predetermined information; query agent means for submitting database query command after the expiration of the query time and receiving the query results; and, query recording means for storing the database query request and the appended parameters received by said control means, the database query command converted by said control means and the determined query time, and for storing the query results received by said query agent means; wherein said control means further determines a receiving device based on the appended parameters, the predetermined information and the query results, converts the query results into a form acceptable by said receiving device, then sends the query results to said receiving device and terminates the query after the acknowledgment of success of sending.
The method and system of the invention can use various kinds of computing devices as querying devices and receiving devices, as large as desktop computers and as small as mobile telephones or one-way/two-way pagers. With these devices, the users can reliably make various database queries and best obtain the query results.
The inventive method can save the connection fee and conveniently provide call-back functionality. The users can remove the connection after they have submitted a database query request. The inventive system can call back the users automatically and continuously after it has received the query results until the users obtain the query results. If a user""s receiving device is out of use, the system can automatically select another of the user""s available receiving devices to receive the query results.
The inventive method and system can conveniently exercise a periodic query and a timed query. The users need only submit the database query request once and the system will automatically either periodically or immediately make queries many times, and continuously send the updated query results back to the users.